<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Welcome to MES World</title>
    <link href="resource/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" media="screen">
    <style>
        body {
            margin: 0px;
            padding: 0px;
            background-image: url(images/login/haven.jpg);
        }

        #navDiv {
            width:1200px;
            margin: 0 auto;
        }

        .navbar {
            margin-top: 80px;
            margin-bottom: 0px;
            background-color: rgba(211, 211, 211, 0.5);
        }

        #mainDiv {
            height: 500px;
            margin-top: 180px;
        }

        #loginDiv {
            border: 1px solid lightgrey;
            background-color: rgba(247, 238, 214, 0.5);
            border-radius: 6px;
        }

        #loginDiv .form-group, #loginDiv p {
            margin: 30px 0px;
        }

        #loginDiv button {
            width: 100px;
        }
    </style>
    <script src="resource/jquery/jquery-2.1.4.min.js"></script>
    <script src="resource/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <script type="text/javascript">
        $(function() {
            $('#userName').focus();
        });
    </script>
</head>
<body>

<div class="container-fluid">
    <div  id="navDiv">
        <nav class="navbar navbar-default">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed"
                            data-toggle="collapse" data-target="#bs-example-navbar-collpase-1"
                            aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span> <span
                            class="icon-bar"></span> <span class="icon-bar"></span> <span
                            class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand">MES</a>
                </div>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#">关于MES</a></li>
                    <li><a href="#">联系我们</a></li>
                    <li><a href="#">更多...</a></li>
                </ul>
            </div>
        </nav>
    </div>
    <div class="row" id="mainDiv">
        <div
                class="col-sm-3 col-sm-offset-7 col-md-3 col-md-offset-7 col-lg-3 col-lg-offset-7"
                id="loginDiv">
            <form class="form-horizontal" action="${pageContext.request.contextPath}/login.do" method="post">
                <p class="text-center lead">用户登陆</p>
                <input name="userName" style="position: absolute;z-index: -10;" disabled autocomplete = "off" hidden/>
                <input type="password" name="password"  style="position: absolute;z-index: -10;" disabled autocomplete = "off" hidden/>
                <div class="form-group">
                    <label for="userName"
                           class="col-sm-3 col-md-3 col-lg-3  control-label">用户名</label>
                    <div class="col-sm-9 col-md-9 col-lg-9">
                        <input type="text" class="form-control" id="userName" name="userName"
                               placeholder="请输入用户名" autocomplete="off">
                    </div>
                </div>
                <div class="form-group">
                    <label for="userName"
                           class="col-sm-3 col-md-3 col-lg-3  control-label">密码</label>
                    <div class="col-sm-9 col-md-9 col-lg-9">
                        <input type="password" class="form-control" id="password" name="password"
                               placeholder="请输入密码" autocomplete="off">
                    </div>
                </div>

                <c:if test="${!empty loginErr}">
                    <font style="color: red">${loginErr}</font>
                </c:if>
                <div class="form-group">
                    <div class="col-sm-offset-3 col-sm-9 col-md-offset-3 col-md-9 col-lg-offset-3 col-lg-9 ">
                        <button type="submit" class="btn btn-default">登陆</button>
                    </div>
                </div>

            </form>

        </div>
    </div>
    <footer class="footer">
        <div class="container">
            <p class="text-center">

            </p>
        </div>
    </footer>


</div>

</body>

<%--<script type="text/javascript" src="/js/index.js"></script>--%>
</html>